<html>
<head><meta charset="utf-8"><title>sync 2019-04-16 · t-compiler/wg-rfc-2229 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/index.html">t-compiler/wg-rfc-2229</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html">sync 2019-04-16</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="163490553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163490553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163490553">(Apr 16 2019 at 17:45)</a>:</h4>
<p>Hey all. Perhaps overwhelming description of open issues, implementation work, thoughts on my end <a href="https://paper.dropbox.com/doc/Upvar-Paths--Aa7C6aefXL6RNSXHuUu8jncVAg-PNRgk22ryKq1n3Wq3FXAO" target="_blank" title="https://paper.dropbox.com/doc/Upvar-Paths--Aa7C6aefXL6RNSXHuUu8jncVAg-PNRgk22ryKq1n3Wq3FXAO">here</a></p>



<a name="163491174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163491174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163491174">(Apr 16 2019 at 17:53)</a>:</h4>
<p><span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span> hey all</p>



<a name="163491178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163491178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163491178">(Apr 16 2019 at 17:53)</a>:</h4>
<p>cc <span class="user-group-mention" data-user-group-id="1175">@WG-rfc-2229</span> -- brief sync</p>



<a name="163491190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163491190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163491190">(Apr 16 2019 at 17:53)</a>:</h4>
<p>So <span class="user-mention" data-user-id="128294">@blitzerr</span> mentioned to me that they'll be busy for the next little bit owing to work stuff</p>



<a name="163491253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163491253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163491253">(Apr 16 2019 at 17:54)</a>:</h4>
<p>I'll talk a look at what you wrote <span class="user-mention" data-user-id="127677">@ange</span>, and I'm hoping today to leave some notes on the freevars stuff</p>



<a name="163491267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163491267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163491267">(Apr 16 2019 at 17:54)</a>:</h4>
<p>cool</p>



<a name="163491286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163491286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163491286">(Apr 16 2019 at 17:54)</a>:</h4>
<p>I'll be around to for clarifications/questions the next half hour or so</p>



<a name="163491313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163491313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163491313">(Apr 16 2019 at 17:55)</a>:</h4>
<p>async works too</p>



<a name="163491834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163491834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163491834">(Apr 16 2019 at 18:01)</a>:</h4>
<blockquote>
<p>Hey all. Perhaps overwhelming description of open issues, implementation work, thoughts on my end <a href="https://paper.dropbox.com/doc/Upvar-Paths--Aa7C6aefXL6RNSXHuUu8jncVAg-PNRgk22ryKq1n3Wq3FXAO" target="_blank" title="https://paper.dropbox.com/doc/Upvar-Paths--Aa7C6aefXL6RNSXHuUu8jncVAg-PNRgk22ryKq1n3Wq3FXAO">here</a></p>
</blockquote>
<p>I see the <a href="https://paper.dropbox.com/doc/Upvar-Paths--AbX~sZfMQ9xWqxGhRpzf4teuAg-PNRgk22ryKq1n3Wq3FXAO#:uid=018734600287208144069502&amp;h2=Apr-16th-2019:" target="_blank" title="https://paper.dropbox.com/doc/Upvar-Paths--AbX~sZfMQ9xWqxGhRpzf4teuAg-PNRgk22ryKq1n3Wq3FXAO#:uid=018734600287208144069502&amp;h2=Apr-16th-2019:">notes from today</a> -- did you add material to the other sections, <span class="user-mention" data-user-id="127677">@ange</span>?</p>



<a name="163491967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163491967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163491967">(Apr 16 2019 at 18:02)</a>:</h4>
<p>yah</p>



<a name="163492033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492033">(Apr 16 2019 at 18:03)</a>:</h4>
<p>I honestly don't know how to best do updates in such a doc; I think currently the easiest way might be for you to browse the history, the edits should be clustered together</p>



<a name="163492093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492093">(Apr 16 2019 at 18:03)</a>:</h4>
<p>I tried to add open issues at some places, but really almost every section has something appended to it</p>



<a name="163492177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492177">(Apr 16 2019 at 18:04)</a>:</h4>
<p>I'm thinking that the most effective way to progress here is probably to schedule some time for us to do a deep dive chat</p>



<a name="163492191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492191">(Apr 16 2019 at 18:04)</a>:</h4>
<p>I feel like I have to focus on this problem for 1-2h :)</p>



<a name="163492223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492223">(Apr 16 2019 at 18:05)</a>:</h4>
<p>What time zone are you in, <span class="user-mention" data-user-id="127677">@ange</span> ?</p>



<a name="163492244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492244">(Apr 16 2019 at 18:05)</a>:</h4>
<blockquote>
<p>I feel like I have to focus on this problem for 1-2h :)</p>
</blockquote>
<p>Makes sense. Whatever time you can spend on it...</p>



<a name="163492251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492251">(Apr 16 2019 at 18:05)</a>:</h4>
<p>currently EEST</p>



<a name="163492365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492365">(Apr 16 2019 at 18:06)</a>:</h4>
<p>I don't know what EEST is :)</p>



<a name="163492380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492380">(Apr 16 2019 at 18:06)</a>:</h4>
<p>Ah, ok, Greek time ;)</p>



<a name="163492385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492385">(Apr 16 2019 at 18:06)</a>:</h4>
<p>sorry, eastern europe summer time</p>



<a name="163492387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492387">(Apr 16 2019 at 18:06)</a>:</h4>
<p>yah</p>



<a name="163492741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492741">(Apr 16 2019 at 18:10)</a>:</h4>
<p>OK, so, I could probably dedicate some time Friday morning (my time) -- say at 09:00 UTC-04:00</p>



<a name="163492802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492802">(Apr 16 2019 at 18:11)</a>:</h4>
<p>I'm afraid I can't do Friday this week, traveling to attend a wedding</p>



<a name="163492878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163492878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163492878">(Apr 16 2019 at 18:12)</a>:</h4>
<p>(so western hemisphere Thursday morning probably won't work for me either)</p>



<a name="163493094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493094">(Apr 16 2019 at 18:15)</a>:</h4>
<p>fwiw, I can do up to 1am EEST if that would be helpful</p>



<a name="163493244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493244">(Apr 16 2019 at 18:16)</a>:</h4>
<p>(currently on vacation :P)</p>



<a name="163493724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493724">(Apr 16 2019 at 18:22)</a>:</h4>
<p>what about next Tuesday?</p>



<a name="163493740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493740">(Apr 16 2019 at 18:23)</a>:</h4>
<p>sure</p>



<a name="163493879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493879">(Apr 16 2019 at 18:24)</a>:</h4>
<p>ok let me add something to the compiler team calendar -- 10:30 UTC-04:00 (17:30 EEST, if I'm not mistaken) work for you?</p>



<a name="163493898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493898">(Apr 16 2019 at 18:24)</a>:</h4>
<p>yah, that's fine. one point though</p>



<a name="163493921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493921">(Apr 16 2019 at 18:25)</a>:</h4>
<p>yep</p>



<a name="163493923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493923">(Apr 16 2019 at 18:25)</a>:</h4>
<p>I'll only have like 3-4 free days after that to wrap up - going back to work full time in May, so dunno how much time I'll have to spend</p>



<a name="163493933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493933">(Apr 16 2019 at 18:25)</a>:</h4>
<p>but I think this is a useful discussion to have regardless</p>



<a name="163493942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493942">(Apr 16 2019 at 18:25)</a>:</h4>
<p>agreed</p>



<a name="163493944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493944">(Apr 16 2019 at 18:25)</a>:</h4>
<p>for this WG</p>



<a name="163493950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493950">(Apr 16 2019 at 18:25)</a>:</h4>
<p>zulip?</p>



<a name="163493955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163493955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163493955">(Apr 16 2019 at 18:25)</a>:</h4>
<p>Yeah</p>



<a name="163494015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163494015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163494015">(Apr 16 2019 at 18:26)</a>:</h4>
<blockquote>
<p>I'll only have like 3-4 free days after that to wrap up - going back to work full time in May, so dunno how much time I'll have to spend</p>
</blockquote>
<p>I don't really have much time before that, I fear :(</p>



<a name="163494026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163494026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163494026">(Apr 16 2019 at 18:26)</a>:</h4>
<p>that's quite alright :-)</p>



<a name="163494033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163494033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163494033">(Apr 16 2019 at 18:26)</a>:</h4>
<p>glad I don't need to set up zoom :-)</p>



<a name="163494055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163494055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163494055">(Apr 16 2019 at 18:26)</a>:</h4>
<p>I hope I can figure out some issues on my own till then, or at least tie up some loose ends</p>



<a name="163494702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163494702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163494702">(Apr 16 2019 at 18:34)</a>:</h4>
<p>I'll see if I can carve out some time for "pre-thinking" and to review your notes in more detail</p>



<a name="163995207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995207">(Apr 23 2019 at 14:34)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> just a suggestion, it might make sense to skim the dropbox paper first if you haven't already. No need to worry about duplication of questions though I'll figure that out after the fact</p>



<a name="163995282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995282">(Apr 23 2019 at 14:35)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="127677">@ange</span> -- sounds good, I've been writing some notes already</p>



<a name="163995322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995322">(Apr 23 2019 at 14:35)</a>:</h4>
<p>cool</p>



<a name="163995745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995745">(Apr 23 2019 at 14:41)</a>:</h4>
<p>umm yah, AFAICT the <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=860e6666c49cd6334634f6fe942857d6" target="_blank" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=860e6666c49cd6334634f6fe942857d6">example</a> you're putting forward is not addressed in the RFC</p>



<a name="163995758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995758">(Apr 23 2019 at 14:41)</a>:</h4>
<p><span class="user-mention" data-user-id="127677">@ange</span> ok so it's probably good for us to elaborate our goals a bit</p>



<a name="163995763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995763">(Apr 23 2019 at 14:41)</a>:</h4>
<p>one part of it I think should be to raise up interesting lang design questions :)</p>



<a name="163995771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995771">(Apr 23 2019 at 14:41)</a>:</h4>
<p>but we should also talk about what the impl in rustc will need</p>



<a name="163995778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995778">(Apr 23 2019 at 14:41)</a>:</h4>
<p>sure</p>



<a name="163995784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995784">(Apr 23 2019 at 14:41)</a>:</h4>
<p>I was wondering -- why did you extend <code>Rvalue</code>, was there a particular motivating example</p>



<a name="163995847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995847">(Apr 23 2019 at 14:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> there was, but it's been so long I don't really remember -- I'll have to get back to you on that</p>



<a name="163995922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163995922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163995922">(Apr 23 2019 at 14:43)</a>:</h4>
<p>it could also be that I was confused re: what the RFC required (e.g. my commit message mentions indexing), so maybe it's a red herring, I would suggest tabling this until I can give a definitive example (or not)</p>



<a name="163996087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996087">(Apr 23 2019 at 14:45)</a>:</h4>
<p>re: the pointer overwrite example above, this feels like a definitional thing (i.e. could go either way if one were starting from scratch), but it seems we might need to pick between backwards compat regarding that and special treatment of box?</p>



<a name="163996122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996122">(Apr 23 2019 at 14:45)</a>:</h4>
<p>Well, <em>strict</em> backwards compatibility may not be a concern</p>



<a name="163996130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996130">(Apr 23 2019 at 14:45)</a>:</h4>
<p>e.g., my example that I gave <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=5c5c43b4e1f0b123681b8b48783d6546" target="_blank" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=5c5c43b4e1f0b123681b8b48783d6546">would not compile today</a></p>



<a name="163996303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996303">(Apr 23 2019 at 14:47)</a>:</h4>
<p>I was skimming your notes about drop and so forth</p>



<a name="163996309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996309">(Apr 23 2019 at 14:47)</a>:</h4>
<p>what would be the considerations for lax backwards compatibility? user astonishment?</p>



<a name="163996324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996324">(Apr 23 2019 at 14:47)</a>:</h4>
<p>My concern is user astonishment, yes</p>



<a name="163996404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996404">(Apr 23 2019 at 14:48)</a>:</h4>
<p>I general I think that -- unless you have a <code>move</code> closure -- the variables in the surrounding stack frame and those in the closure should not "go out of sync"</p>



<a name="163996429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996429">(Apr 23 2019 at 14:48)</a>:</h4>
<p>i.e., if the code compiles, then the same path in both places should yield same value</p>



<a name="163996442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996442">(Apr 23 2019 at 14:48)</a>:</h4>
<p>But this is a bit of a "design decision", worth surfacing</p>



<a name="163996468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996468">(Apr 23 2019 at 14:48)</a>:</h4>
<p>(Still, that is -- I think -- a useful invariant that Rust maintains today, and it is by design that it does so)</p>



<a name="163996490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996490">(Apr 23 2019 at 14:49)</a>:</h4>
<p>(in the past, we considered "auto-inferring" <code>move</code> annotations on closures, for example, but opted against it for this reason -- and because we can't always do so)</p>



<a name="163996505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996505">(Apr 23 2019 at 14:49)</a>:</h4>
<p>well, if closures are defined to be minimal, this feels like a teachability thing, i.e. a "but beware of references" paragraph somewhere. but I guess that's something to get wider feedback on</p>



<a name="163996519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996519">(Apr 23 2019 at 14:49)</a>:</h4>
<p>ah</p>



<a name="163996728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996728">(Apr 23 2019 at 14:51)</a>:</h4>
<p>so I suspect that you added the rvalue feedback because</p>



<a name="163996736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996736">(Apr 23 2019 at 14:51)</a>:</h4>
<p>of overloaded index and deref operators</p>



<a name="163996834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996834">(Apr 23 2019 at 14:52)</a>:</h4>
<p>i.e., if we have <code>some_vec[3].foo</code>, we will probably give back a cmt that roughly corresponds to this desugared version:</p>
<div class="codehilite"><pre><span></span>tmp = Index::index(&amp;some_vec, 3);
&amp;(*tmp).foo
</pre></div>


<p>i.e., this "temporary" is the rvalue</p>



<a name="163996896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996896">(Apr 23 2019 at 14:53)</a>:</h4>
<p>but then again that seems .. sort of ok .. in that there is <em>also</em> a borrow of <code>some_vec</code>, and indeed we probably need to capture the whole vec for this reason</p>



<a name="163996911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996911">(Apr 23 2019 at 14:53)</a>:</h4>
<p>but I guess that if we had a notion of "pure" overloaded ops, we would have trouble</p>



<a name="163996913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996913">(Apr 23 2019 at 14:53)</a>:</h4>
<p>yah. it's just that the RFC explicitly specifies that indexing is impure, so it could be that I was just confused</p>



<a name="163996930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163996930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163996930">(Apr 23 2019 at 14:53)</a>:</h4>
<p>and so perhaps you were motivated by (e.g.) <code>Box</code></p>



<a name="163997035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997035">(Apr 23 2019 at 14:54)</a>:</h4>
<p>that does ring a bell, but I do know I didn't have any <code>Box</code> testcases back then -- perhaps I was just trying to code ahead</p>



<a name="163997097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997097">(Apr 23 2019 at 14:55)</a>:</h4>
<p>I keep learning about both rustc and rust semantics, so I wouldn't read too much into my implementation choices from 3 weeks back</p>



<a name="163997133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997133">(Apr 23 2019 at 14:56)</a>:</h4>
<p>it appears you <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/upvar.20path/near/161461243" title="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/upvar.20path/near/161461243">asked me about it here</a></p>



<a name="163997230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997230">(Apr 23 2019 at 14:56)</a>:</h4>
<p>it looks like you were concerned about <code>foo.bar[x].baz</code></p>



<a name="163997250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997250">(Apr 23 2019 at 14:57)</a>:</h4>
<p>in such a case, we probably want to borrow <code>&amp;foo.bar</code></p>



<a name="163997262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997262">(Apr 23 2019 at 14:57)</a>:</h4>
<p><em>however</em>, I would expect that the current code will give you <em>two</em> callbacks</p>



<a name="163997275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997275">(Apr 23 2019 at 14:57)</a>:</h4>
<p>one for <code>foo.bar</code> and one for <code>(rvalue).baz</code>, something like that</p>



<a name="163997304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997304">(Apr 23 2019 at 14:57)</a>:</h4>
<p>right, I remember now, I wanted to look past the indexing from right to left</p>



<a name="163997387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997387">(Apr 23 2019 at 14:58)</a>:</h4>
<p>hmm. I'm not sure that's the case then, but it could be that I hadn't instrumented all the delegate callbacks back then, so I misunderstood and thought that was necessary</p>



<a name="163997398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997398">(Apr 23 2019 at 14:58)</a>:</h4>
<p>I can try and verify whether that's the case or not</p>



<a name="163997405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997405">(Apr 23 2019 at 14:58)</a>:</h4>
<p>it's possible the code doesn't, but it seems like it'd be a gaping hole in the old borrow check</p>



<a name="163997412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997412">(Apr 23 2019 at 14:58)</a>:</h4>
<p>which..of course..is possible, there were numerous bugs :)</p>



<a name="163997488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997488">(Apr 23 2019 at 14:59)</a>:</h4>
<p>In any case, I do think it's worth us looking a bit to the future</p>



<a name="163997494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997494">(Apr 23 2019 at 14:59)</a>:</h4>
<p>I would say it's extraordinarily more likely that I didn't really under which circumstances each callback was called (I'm still not 100% sure I get all call paths)</p>



<a name="163997532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997532">(Apr 23 2019 at 15:00)</a>:</h4>
<p>The existing upvar code is based on this <code>ExprUseVisitor</code>, which is shared by typeck and the old, AST-based borrowck</p>



<a name="163997570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997570">(Apr 23 2019 at 15:00)</a>:</h4>
<p>right</p>



<a name="163997628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997628">(Apr 23 2019 at 15:00)</a>:</h4>
<p>(as well as two other pieces of code, both of which I think are outdated in a fashion similar to borrow check)</p>



<a name="163997683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997683">(Apr 23 2019 at 15:01)</a>:</h4>
<p>my general feeling is that it makes sense to rewrite expr-use-visitor to be cleaner and more tailored to the needs of upvarck</p>



<a name="163997721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997721">(Apr 23 2019 at 15:01)</a>:</h4>
<p>this would probably include creating a new data structure that would replace cmt for this purpose</p>



<a name="163997741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997741">(Apr 23 2019 at 15:01)</a>:</h4>
<p>probably this is the <code>CapturePath</code> that you had talked about</p>



<a name="163997820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997820">(Apr 23 2019 at 15:02)</a>:</h4>
<blockquote>
<p>my general feeling is that it makes sense to rewrite expr-use-visitor to be cleaner and more tailored to the needs of upvarck</p>
</blockquote>
<p>the integration with <a href="http://upvar.rs" target="_blank" title="http://upvar.rs">upvar.rs</a> has always been a bit crufty</p>



<a name="163997831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997831">(Apr 23 2019 at 15:02)</a>:</h4>
<p>what parts of <code>ExprUseVisitor</code> strike you as redundant for <code>upvar.rs</code>?</p>



<a name="163997891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997891">(Apr 23 2019 at 15:03)</a>:</h4>
<p>it's not so much that they are <em>redundant</em> as <em>superfluous</em></p>



<a name="163997900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997900">(Apr 23 2019 at 15:03)</a>:</h4>
<p>i.e., unnecessary</p>



<a name="163997911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997911">(Apr 23 2019 at 15:03)</a>:</h4>
<p>but here are some examples</p>



<a name="163997924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997924">(Apr 23 2019 at 15:03)</a>:</h4>
<p>for one thing, the ExprUseVisitor tries to "desugar" references to upvars</p>



<a name="163997932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997932">(Apr 23 2019 at 15:03)</a>:</h4>
<p>this is kind of awkward for us</p>



<a name="163997948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163997948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163997948">(Apr 23 2019 at 15:03)</a>:</h4>
<p>we have to "resugar" those references by intercepting the "notes" that are attached to cmts</p>



<a name="163998005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998005">(Apr 23 2019 at 15:04)</a>:</h4>
<p>I guess in general the <code>ExprUseVisitor</code> is doing more desugaring than I think we truly want</p>



<a name="163998022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998022">(Apr 23 2019 at 15:04)</a>:</h4>
<p>the case of <code>Rvalue</code> is another such example</p>



<a name="163998027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998027">(Apr 23 2019 at 15:04)</a>:</h4>
<p>right, AFAIU this is needed for borrowck, though I'm totally unclear on the details</p>



<a name="163998031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998031">(Apr 23 2019 at 15:04)</a>:</h4>
<p>that said, we do want it to do <em>some</em> amount of -- at least normalization</p>



<a name="163998039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998039">(Apr 23 2019 at 15:04)</a>:</h4>
<p>yes, it is, but if we made a split copy of the code that was tailored to the needs of <a href="http://upvar.rs" target="_blank" title="http://upvar.rs">upvar.rs</a>, it could be simpler</p>



<a name="163998041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998041">(Apr 23 2019 at 15:04)</a>:</h4>
<p>that's my general point</p>



<a name="163998052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998052">(Apr 23 2019 at 15:04)</a>:</h4>
<p>hmm</p>



<a name="163998088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998088">(Apr 23 2019 at 15:05)</a>:</h4>
<p>also relevant here is looking -- as you were starting to do -- at the code which comes after</p>



<a name="163998094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998094">(Apr 23 2019 at 15:05)</a>:</h4>
<p>it's a fair point - do you think it would make sense to reuse <code>cmt_</code> and aim to trim it when upvar becomes the sole user?</p>



<a name="163998112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998112">(Apr 23 2019 at 15:05)</a>:</h4>
<blockquote>
<p>yes, it is, but if we made a split copy of the code that was tailored to the needs of <a href="http://upvar.rs" target="_blank" title="http://upvar.rs">upvar.rs</a>, it could be simpler</p>
</blockquote>
<p>( in general, I think re-using and sharing code is good, but since the old borrowck is going to be deleted, it won't be shared anymore )</p>



<a name="163998122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998122">(Apr 23 2019 at 15:05)</a>:</h4>
<blockquote>
<p>it's a fair point - do you think it would make sense to reuse <code>cmt_</code> and aim to trim it when upvar becomes the sole user?</p>
</blockquote>
<p>I do not, I would rewrite that code from scratch</p>



<a name="163998124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998124">(Apr 23 2019 at 15:05)</a>:</h4>
<p>it's quite old</p>



<a name="163998128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998128">(Apr 23 2019 at 15:05)</a>:</h4>
<p>you can tell by the naming conventions ;)</p>



<a name="163998223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998223">(Apr 23 2019 at 15:06)</a>:</h4>
<p>I feel like what we want is something much closer to the HIR</p>



<a name="163998286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998286">(Apr 23 2019 at 15:07)</a>:</h4>
<p>well, "old" is not <em>necessarily</em> bad in my book :-) but as there are specific changes to be made, sure</p>



<a name="163998287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998287">(Apr 23 2019 at 15:07)</a>:</h4>
<p>that is, we want simpler paths that are much closer to the what the user wrote. But it's interesting to think about just what bits of extra info we <em>do</em> need</p>



<a name="163998370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998370">(Apr 23 2019 at 15:08)</a>:</h4>
<blockquote>
<p>well, "old" is not <em>necessarily</em> bad in my book :-) but as there are specific changes to be made, sure</p>
</blockquote>
<p>no, I agree, but</p>



<a name="163998388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998388">(Apr 23 2019 at 15:08)</a>:</h4>
<p>I think I get where you're coming from here - this might be an opportunity to reduce some of the technical debt in the compiler and, if so, we should take it</p>



<a name="163998399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998399">(Apr 23 2019 at 15:08)</a>:</h4>
<p>yes, basically that</p>



<a name="163998415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998415">(Apr 23 2019 at 15:08)</a>:</h4>
<p>so, let's imagine that we created a <code>CapturePath</code> like type</p>



<a name="163998434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998434">(Apr 23 2019 at 15:08)</a>:</h4>
<p>I think it would be fairly simple, probably reasonably similar to the MIR Place</p>



<a name="163998442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998442">(Apr 23 2019 at 15:09)</a>:</h4>
<p>personally, I'd be much more comfortable doing that if I had extensive tests that fully exercise the code though (so, in my mind, that would be a mostly complete end to end implementation of the RFC)</p>



<a name="163998457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998457">(Apr 23 2019 at 15:09)</a>:</h4>
<p>(though the new MIR place that we're trying to move to, not the current one)</p>



<a name="163998491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998491">(Apr 23 2019 at 15:09)</a>:</h4>
<p>I haven't looked at MIR Place 2.0 yet</p>



<a name="163998565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998565">(Apr 23 2019 at 15:10)</a>:</h4>
<p>It's not that complex, it's basically a re-oriented data structure that is better optimized for going <em>forward</em></p>



<a name="163998602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998602">(Apr 23 2019 at 15:10)</a>:</h4>
<p>that's what we need for this RFC, yah</p>



<a name="163998644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998644">(Apr 23 2019 at 15:11)</a>:</h4>
<p>the main change is that you have (sort of) <code>(CapturePathBase, Vec&lt;CapturePathExtension&gt;)</code></p>



<a name="163998654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998654">(Apr 23 2019 at 15:11)</a>:</h4>
<p>where <code>CapturePathExtension</code> is like deref, field, index</p>



<a name="163998720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998720">(Apr 23 2019 at 15:12)</a>:</h4>
<p>why index?</p>



<a name="163998727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998727">(Apr 23 2019 at 15:12)</a>:</h4>
<blockquote>
<p>personally, I'd be much more comfortable doing that if I had extensive tests that fully exercise the code though (so, in my mind, that would be a mostly complete end to end implementation of the RFC)</p>
</blockquote>
<p>I do think we should think about tests here -- but of course we don't have any tests for this new feature, since it doesn't exist. What we <em>do</em> have (for the old code) is borrow check tests, that show it is "detecting" the mutations, borrows, etc at least a lot of the time. So this is probably what we'd have to reproduce.</p>



<a name="163998734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998734">(Apr 23 2019 at 15:12)</a>:</h4>
<p>But that's good anyway</p>



<a name="163998742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998742">(Apr 23 2019 at 15:12)</a>:</h4>
<p>because those tests exist for simple fns, but not necessarily for closures</p>



<a name="163998759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998759">(Apr 23 2019 at 15:13)</a>:</h4>
<p>(and indeed creating a thorough test suite is I think a key part of the work to be done)</p>



<a name="163998779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998779">(Apr 23 2019 at 15:13)</a>:</h4>
<blockquote>
<p>why index?</p>
</blockquote>
<p>you're correct that for capture paths it could be excluded</p>



<a name="163998786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998786">(Apr 23 2019 at 15:13)</a>:</h4>
<p>it is part of the "generality"</p>



<a name="163998794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998794">(Apr 23 2019 at 15:13)</a>:</h4>
<p>that is, it is part of MIR</p>



<a name="163998817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998817">(Apr 23 2019 at 15:13)</a>:</h4>
<p>I only meant, this would be one argument for going with <code>cmt_</code>, then rewriting after we're comfortable it mostly works -- but that's probably me being unsafe about my knowledge of rustc</p>



<a name="163998883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998883">(Apr 23 2019 at 15:14)</a>:</h4>
<blockquote>
<p>that is, it is part of MIR</p>
</blockquote>
<p>Oh you were describing Place 2.0? OK</p>



<a name="163998897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998897">(Apr 23 2019 at 15:14)</a>:</h4>
<p>I see. Well, it seems to have a "base case" problem -- how are we confident that it mostly works :)</p>



<a name="163998914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998914">(Apr 23 2019 at 15:14)</a>:</h4>
<p>In any case, the next question</p>



<a name="163998917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998917">(Apr 23 2019 at 15:14)</a>:</h4>
<p>presume we <em>had</em> this notion of capture-path</p>



<a name="163998935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998935">(Apr 23 2019 at 15:14)</a>:</h4>
<p>Well, currently I'm trying to extend my testcases to exercise all paths in <code>upvar.rs </code>:-)</p>



<a name="163998961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998961">(Apr 23 2019 at 15:15)</a>:</h4>
<p>so, to talk about the tests for a moemnt</p>



<a name="163998966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998966">(Apr 23 2019 at 15:15)</a>:</h4>
<blockquote>
<p>Well, currently I'm trying to extend my testcases to exercise all paths in <code>upvar.rs </code>:-)</p>
</blockquote>
<p>(I know path coverage isn't enough)</p>



<a name="163998969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998969">(Apr 23 2019 at 15:15)</a>:</h4>
<p>esp .give as your time is limited :)</p>



<a name="163998978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998978">(Apr 23 2019 at 15:15)</a>:</h4>
<p>I think a really great think we could focus on right now</p>



<a name="163998990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163998990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163998990">(Apr 23 2019 at 15:15)</a>:</h4>
<p>is trying to map out the scenarios that make sure we have tests covering them and expected outcomes</p>



<a name="163999059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999059">(Apr 23 2019 at 15:16)</a>:</h4>
<p>I'm trying to think what the "matrix" looks like</p>



<a name="163999081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999081">(Apr 23 2019 at 15:16)</a>:</h4>
<p>(it seems like you've been doing a lot of that work)</p>



<a name="163999091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999091">(Apr 23 2019 at 15:16)</a>:</h4>
<p>basically I think some of the key "unresolved questions" of the RFC were around the specifics of the "capture" algorithm</p>



<a name="163999104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999104">(Apr 23 2019 at 15:16)</a>:</h4>
<p>(though the hardest one to answer are the potential changes to drop order)</p>



<a name="163999151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999151">(Apr 23 2019 at 15:17)</a>:</h4>
<blockquote>
<p>(it seems like you've been doing a lot of that work)</p>
</blockquote>
<p>most of what I have is in <a href="https://github.com/aoikonomopoulos/rust/blob/b44513e3b7fb25c370fb91e5271f30701bbb09fe/src/test/ui/closures/closure-partial-captures.rs" target="_blank" title="https://github.com/aoikonomopoulos/rust/blob/b44513e3b7fb25c370fb91e5271f30701bbb09fe/src/test/ui/closures/closure-partial-captures.rs">https://github.com/aoikonomopoulos/rust/blob/b44513e3b7fb25c370fb91e5271f30701bbb09fe/src/test/ui/closures/closure-partial-captures.rs</a> fwiw</p>



<a name="163999297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999297">(Apr 23 2019 at 15:19)</a>:</h4>
<p>great</p>



<a name="163999299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999299">(Apr 23 2019 at 15:19)</a>:</h4>
<blockquote>
<p>I think a really great think we could focus on right now</p>
</blockquote>
<p>Agreed, though I would add that having a less fuzzy implementation plan for the next steps would make this much easier for people to work on piecemeal</p>



<a name="163999307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999307">(Apr 23 2019 at 15:19)</a>:</h4>
<p>yes, it's worth trying to talk out that plan a bit more</p>



<a name="163999402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999402">(Apr 23 2019 at 15:20)</a>:</h4>
<p>one nice thing about this refactoring that I'm sort of pitching, of course, is that we can refactor <a href="http://upvar.rs" target="_blank" title="http://upvar.rs">upvar.rs</a> <em>as it is now</em> (without supporting (yet) RFC 2229) and use our test suite and crater to check for problems</p>



<a name="163999408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999408">(Apr 23 2019 at 15:20)</a>:</h4>
<p>that should shake out most of the bugs</p>



<a name="163999428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999428">(Apr 23 2019 at 15:20)</a>:</h4>
<p>(and help us grow our test suite, since any bugs we find with crater that weren't detected by our tests are good candidates for unit tests)</p>



<a name="163999481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999481">(Apr 23 2019 at 15:21)</a>:</h4>
<p>anyway, the next question I think is what canges downstream</p>



<a name="163999492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999492">(Apr 23 2019 at 15:21)</a>:</h4>
<p>as you highlight in your doc, there are lots of places where we talk about "upvars" =)</p>



<a name="163999768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999768">(Apr 23 2019 at 15:24)</a>:</h4>
<p>The most immediate thing would be that we have to alter HAIR construction -- right now, the upvars are always individual variables. We would presumably load use the capture path to construct a more precise result.</p>



<a name="163999933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/163999933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#163999933">(Apr 23 2019 at 15:26)</a>:</h4>
<blockquote>
<p>The most immediate thing would be that we have to alter HAIR construction -- right now, the upvars are always individual variables. We would presumably load use the capture path to construct a more precise result.</p>
</blockquote>
<p>So, I have this relevant note in the doc:<br>
Alternatively, we could do the rewriting of both the capturing and the accessing during translation to HAIR or MIR. This would mean changing the number of upvar captures after type/borrow checking though. The implementation might end up a bit more involved and there’s less of a safety net.</p>



<a name="164000064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000064">(Apr 23 2019 at 15:27)</a>:</h4>
<p>I don't really think we should change the basic shape of how things work today</p>



<a name="164000106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000106">(Apr 23 2019 at 15:28)</a>:</h4>
<p>They are this way for a reason :)</p>



<a name="164000126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000126">(Apr 23 2019 at 15:28)</a>:</h4>
<p>That is, I think that HAIR should make explicit the paths that it accesses</p>



<a name="164000143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000143">(Apr 23 2019 at 15:28)</a>:</h4>
<p>MIR construction really wouldn't have to change at all</p>



<a name="164000161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000161">(Apr 23 2019 at 15:28)</a>:</h4>
<p>Well, that's not quite true</p>



<a name="164000170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000170">(Apr 23 2019 at 15:28)</a>:</h4>
<p>The complex bit is now so much constructing the closure</p>



<a name="164000187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000187">(Apr 23 2019 at 15:29)</a>:</h4>
<p>The complex bit is constructing the closure <em>body</em></p>



<a name="164000209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000209">(Apr 23 2019 at 15:29)</a>:</h4>
<p>in particular, right now, we can intercept just the root local variable access</p>



<a name="164000214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000214">(Apr 23 2019 at 15:29)</a>:</h4>
<p>and translate it to an upvar access</p>



<a name="164000219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000219">(Apr 23 2019 at 15:29)</a>:</h4>
<p>ok, so the fundamental issue I'm worried about here is that we can change what's captured in <code>upvar.rs</code>, but we can't change what's used until HAIR translation, so how will type checking work?</p>



<a name="164000223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000223">(Apr 23 2019 at 15:29)</a>:</h4>
<p>but we now have to intercept arbitrary points</p>



<a name="164000232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000232">(Apr 23 2019 at 15:29)</a>:</h4>
<p>right</p>



<a name="164000240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000240">(Apr 23 2019 at 15:29)</a>:</h4>
<blockquote>
<p>ok, so the fundamental issue I'm worried about here is that we can change what's captured in <code>upvar.rs</code>, but we can't change what's used until HAIR translation, so how will type checking work?</p>
</blockquote>
<p>I don't quite understand this concern</p>



<a name="164000307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000307">(Apr 23 2019 at 15:30)</a>:</h4>
<blockquote>
<p>but we now have to intercept arbitrary points</p>
</blockquote>
<p>so we need some form of data structure that lists out those points, I think</p>



<a name="164000313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000313">(Apr 23 2019 at 15:30)</a>:</h4>
<p>it's basically what you just said, I think</p>



<a name="164000318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000318">(Apr 23 2019 at 15:30)</a>:</h4>
<p>this seems relevant to the capture-path design, as well</p>



<a name="164000328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000328">(Apr 23 2019 at 15:30)</a>:</h4>
<p>would the expr adjustments work?</p>



<a name="164000343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000343">(Apr 23 2019 at 15:30)</a>:</h4>
<p>I mean, with a new adjustment type</p>



<a name="164000377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000377">(Apr 23 2019 at 15:31)</a>:</h4>
<p>i.e., if we keep the basic model of expr-use-visitor, then we're going to be getting various callbacks saying "this capture-path is accessed at this point"</p>



<a name="164000397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000397">(Apr 23 2019 at 15:31)</a>:</h4>
<p>we need to be able to revisit those points and say "map point X to upvar U"</p>



<a name="164000398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000398">(Apr 23 2019 at 15:31)</a>:</h4>
<p>right. and we don't know what we want to rewrite it to until we've visited the whole closure body</p>



<a name="164000403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000403">(Apr 23 2019 at 15:31)</a>:</h4>
<p>right</p>



<a name="164000459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000459">(Apr 23 2019 at 15:32)</a>:</h4>
<p>well</p>



<a name="164000475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000475">(Apr 23 2019 at 15:32)</a>:</h4>
<p>yeah; I mean one thing we might do is just revisit the body again once we've got the answer, but we might also remember the points we need and adjust it as we go. that's an interesting question.</p>



<a name="164000486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000486">(Apr 23 2019 at 15:32)</a>:</h4>
<p>I would say it's "map point X to upvar U + some sub path"</p>



<a name="164000495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000495">(Apr 23 2019 at 15:32)</a>:</h4>
<p>no, I wouldn't say that</p>



<a name="164000506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000506">(Apr 23 2019 at 15:33)</a>:</h4>
<p>both would be possible perhaps</p>



<a name="164000517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000517">(Apr 23 2019 at 15:33)</a>:</h4>
<p>but I think that e.g. if we have <code>a.b.c.d</code>, and we wind up deciding to capture <code>a.b</code></p>



<a name="164000519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000519">(Apr 23 2019 at 15:33)</a>:</h4>
<p>ok, but in the general case there will be some subpath, no?</p>



<a name="164000523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000523">(Apr 23 2019 at 15:33)</a>:</h4>
<p>we should not map <code>a.b.c.d</code> to "<code>a.b</code> + c.d`</p>



<a name="164000533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000533">(Apr 23 2019 at 15:33)</a>:</h4>
<p>we should instead remap the <code>a.b</code> location</p>



<a name="164000606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000606">(Apr 23 2019 at 15:34)</a>:</h4>
<p>i.e., if the input is something like:</p>
<ul>
<li>Node 0: <code>d</code><ul>
<li>Node 1: <code>c</code><ul>
<li>Node 2: <code>b</code><ul>
<li>Node 3: <code>a</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>we could map node 0 to <code>upvar 0 + c.d</code></p>



<a name="164000611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000611">(Apr 23 2019 at 15:34)</a>:</h4>
<p>I think we're saying the same thing? you would convert that to <code>env.0.c.d</code></p>



<a name="164000615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000615">(Apr 23 2019 at 15:34)</a>:</h4>
<p>or we could map node 2 to upvar 0</p>



<a name="164000637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000637">(Apr 23 2019 at 15:34)</a>:</h4>
<p>right</p>



<a name="164000638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000638">(Apr 23 2019 at 15:34)</a>:</h4>
<blockquote>
<p>I think we're saying the same thing? you would convert that to <code>env.0.c.d</code></p>
</blockquote>
<p>the point is, the data structure that does the mapping is a map of <code>NodeId -&gt; UpvarId</code> or something</p>



<a name="164000644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000644">(Apr 23 2019 at 15:34)</a>:</h4>
<p>it doesn't know anything about the "suffix"</p>



<a name="164000656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000656">(Apr 23 2019 at 15:35)</a>:</h4>
<p>ah I see what you mean, yah</p>



<a name="164000672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000672">(Apr 23 2019 at 15:35)</a>:</h4>
<p>you asked about adjustments:</p>



<a name="164000681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000681">(Apr 23 2019 at 15:35)</a>:</h4>
<p>one interesting question is whether we would ever capture "mid adjustment"</p>



<a name="164000696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000696">(Apr 23 2019 at 15:35)</a>:</h4>
<p>heh</p>



<a name="164000704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000704">(Apr 23 2019 at 15:35)</a>:</h4>
<p>it'd be nice if we didn't :)</p>



<a name="164000722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000722">(Apr 23 2019 at 15:36)</a>:</h4>
<p>I'll take your word for it :-)</p>



<a name="164000784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000784">(Apr 23 2019 at 15:36)</a>:</h4>
<p>that it's even possible, in fact</p>



<a name="164000808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000808">(Apr 23 2019 at 15:36)</a>:</h4>
<p>well I mean a simple example would be something like <code>x.y</code> -- if <code>x: &amp;mut Foo</code>, then this has an "adjustment" like <code>(*x).y</code></p>



<a name="164000815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000815">(Apr 23 2019 at 15:36)</a>:</h4>
<p>you could imagine us choosing to capture <code>*x</code></p>



<a name="164000842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000842">(Apr 23 2019 at 15:37)</a>:</h4>
<p>e.g., if there is also a use of <code>*x</code> but not <code>x</code> itself</p>



<a name="164000852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000852">(Apr 23 2019 at 15:37)</a>:</h4>
<p>ugh</p>



<a name="164000853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000853">(Apr 23 2019 at 15:37)</a>:</h4>
<p>but I .. think we could probably "equally well" choose <code>x</code>, in terms of whether the <em>user</em> cares</p>



<a name="164000878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000878">(Apr 23 2019 at 15:37)</a>:</h4>
<p>so we might want to take that into account or something</p>



<a name="164000891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000891">(Apr 23 2019 at 15:37)</a>:</h4>
<p>(although it might not be so bad if we did intercept mid-adjustment)</p>



<a name="164000898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000898">(Apr 23 2019 at 15:37)</a>:</h4>
<p>still, it sounds like a pain</p>



<a name="164000899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164000899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164000899">(Apr 23 2019 at 15:37)</a>:</h4>
<p>that warrants a TODO at the very least, yah</p>



<a name="164001028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001028">(Apr 23 2019 at 15:39)</a>:</h4>
<p>anyway, assuming we handle that</p>



<a name="164001042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001042">(Apr 23 2019 at 15:39)</a>:</h4>
<p>I think that MIR construction wouldnt' have to change much, if at all</p>



<a name="164001057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001057">(Apr 23 2019 at 15:39)</a>:</h4>
<p>the work is mostly going to be handled in the HIR -&gt; HAIR lowering</p>



<a name="164001132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001132">(Apr 23 2019 at 15:40)</a>:</h4>
<p>now, MIR <em>borrow check</em>, on the other hand, may need to change, but I think primarily around the diagnostics</p>



<a name="164001152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001152">(Apr 23 2019 at 15:40)</a>:</h4>
<p>this is going to be somewhat non-trivial, likely</p>



<a name="164001160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001160">(Apr 23 2019 at 15:40)</a>:</h4>
<blockquote>
<blockquote>
<p>I think we're saying the same thing? you would convert that to <code>env.0.c.d</code></p>
</blockquote>
<p>the point is, the data structure that does the mapping is a map of <code>NodeId -&gt; UpvarId</code> or something</p>
</blockquote>
<p>Hmm. How do you build that up, exactly? To decide what node you want to rewrite, you need to have seen all paths first, no?</p>



<a name="164001175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001175">(Apr 23 2019 at 15:40)</a>:</h4>
<blockquote>
<p>the work is mostly going to be handled in the HIR -&gt; HAIR lowering</p>
</blockquote>
<p>How will this work, exactly? AFAIU, if we change the Upvar but only do the rewriting of the access in the HAIR translation, won't the types mismatch in the meantime?</p>



<a name="164001205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001205">(Apr 23 2019 at 15:40)</a>:</h4>
<blockquote>
<p>Hmm. How do you build that up, exactly? To decide what node you want to rewrite, you need to have seen all paths first, no?</p>
</blockquote>
<p>Yes, we either have to walk the body again to build the map, or else we have to keep enough data from the first walk that we can build it</p>



<a name="164001276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001276">(Apr 23 2019 at 15:41)</a>:</h4>
<p>there is a bit of tension here in that the "capture path" would like to be "disconnected" from the specific place it appears <em>sometimes</em> but not always</p>



<a name="164001353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001353">(Apr 23 2019 at 15:42)</a>:</h4>
<p>i.e., if the capture-path included the id of the HIR it was built from or whatever, that might help us to construct the "upvar map" incrementally</p>



<a name="164001355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001355">(Apr 23 2019 at 15:42)</a>:</h4>
<blockquote>
<p>there is a bit of tension here in that the "capture path" would like to be "disconnected" from the specific place it appears <em>sometimes</em> but not always</p>
</blockquote>
<p>right. it seems to be mostly logistics though</p>



<a name="164001368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001368">(Apr 23 2019 at 15:42)</a>:</h4>
<p>but I'm unpersuaded that is what we want, I think I would definitely consider a second walk</p>



<a name="164001396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001396">(Apr 23 2019 at 15:42)</a>:</h4>
<p>I guess i'm not really sure</p>



<a name="164001409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001409">(Apr 23 2019 at 15:42)</a>:</h4>
<p>but yeah it feels like "logistics"</p>



<a name="164001450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001450">(Apr 23 2019 at 15:43)</a>:</h4>
<p>this is all sounding decidedly non-trivial :)</p>



<a name="164001483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001483">(Apr 23 2019 at 15:43)</a>:</h4>
<p>not .. NLL-level of complexity, but like it will require a <del>bit</del> lot more attention from an experiented mentor than we've had thus far</p>



<a name="164001489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001489">(Apr 23 2019 at 15:43)</a>:</h4>
<p>well. yah</p>



<a name="164001558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001558">(Apr 23 2019 at 15:44)</a>:</h4>
<p>yah, that seems to be a significant consideration</p>



<a name="164001563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001563">(Apr 23 2019 at 15:44)</a>:</h4>
<p>(the next interesting thing is to think about the incremental steps)</p>



<a name="164001574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001574">(Apr 23 2019 at 15:44)</a>:</h4>
<p>anyway, I have to run now and get myself some lunch</p>



<a name="164001581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001581">(Apr 23 2019 at 15:44)</a>:</h4>
<p>kk</p>



<a name="164001626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001626">(Apr 23 2019 at 15:45)</a>:</h4>
<p>I think the clear take-away thus far is:</p>
<ul>
<li>we need to dig more into this plan</li>
<li>we need tests =) and we should think about what form they should take</li>
<li>have to think about how to schedule the bandwidth</li>
</ul>



<a name="164001638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001638">(Apr 23 2019 at 15:45)</a>:</h4>
<p>(this feels like it would be a good candidate for the rustc design meeting, while i'm at it)</p>



<a name="164001650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001650">(Apr 23 2019 at 15:45)</a>:</h4>
<p>specifically talking about the details of how the capturing ought to work and so forth</p>



<a name="164001708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001708">(Apr 23 2019 at 15:46)</a>:</h4>
<p>an open question on my end is how this would work if you want to rewrite the accesses during HAIR conversion. AFAIU, there would be a type mismatch in the meantime and doesn't type checking happen on the HIR?</p>



<a name="164001753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164001753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164001753">(Apr 23 2019 at 15:46)</a>:</h4>
<p>well, it's good that the tests seem to be somewhat actionable at least :-)</p>



<a name="164003168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164003168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164003168">(Apr 23 2019 at 16:02)</a>:</h4>
<blockquote>
<p>an open question on my end is how this would work if you want to rewrite the accesses during HAIR conversion. AFAIU, there would be a type mismatch in the meantime and doesn't type checking happen on the HIR?</p>
</blockquote>
<p>type mismatch where and how? I don't yet see the problem you are concerned about =)</p>



<a name="164004543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164004543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164004543">(Apr 23 2019 at 16:17)</a>:</h4>
<p>Lemme try to explain: my concern is that we'll need to<br>
1. change the number of upvars in <code>upvar.rs</code> (e.g. when two fields of a struct are captured rather than the struct) and, of course their types. I presume this would happen in <code>closure_analyze</code> in the same file.<br>
2. change what is referenced in the closure body, as we talked about above. AFAIU you're suggesting we do that during HAIR conversion.<br>
So the scenario I'm concerned about is that we do 1, then run type checking (for the HIR) but at that point what upvar does the closure body reference? The previous one. Hmm. Oh I see, typeck doesn't need to look at the captured upvars mentioned in <code>TypeckTables</code> at all</p>



<a name="164004709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164004709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164004709">(Apr 23 2019 at 16:19)</a>:</h4>
<p>so both capturing the upvars deduced in <code>upvar.rs</code>and rewriting the accesses to them would take place during HAIR conversion, that makes sense</p>



<a name="164005563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164005563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164005563">(Apr 23 2019 at 16:27)</a>:</h4>
<p>So, after this, I'm still unclear on "Respecting drop order", "Moving out of drop" and what exactly " &amp;&lt;Box&lt;_&gt; as Deref&gt;::deref(&amp;box_foo).b" (from the RFC) would be used for -- not sure whether you want to spend any cycles on that given the other open questions though</p>



<a name="164013130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013130">(Apr 23 2019 at 17:56)</a>:</h4>
<p>so, first of all, upvar analysis takes place <strong>after</strong> type-checking</p>



<a name="164013138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013138">(Apr 23 2019 at 17:56)</a>:</h4>
<p>that is, we're making all of these decisions after type-checking is complete</p>



<a name="164013190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013190">(Apr 23 2019 at 17:57)</a>:</h4>
<p>second, we're not really going to <em>change</em> what is referenced in the closure body -- well, it depends on your POV I guess, but we're going to be adding side annotations</p>



<a name="164013205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013205">(Apr 23 2019 at 17:57)</a>:</h4>
<p>but I guess you put it together, I see :)</p>



<a name="164013266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013266">(Apr 23 2019 at 17:58)</a>:</h4>
<blockquote>
<p>So, after this, I'm still unclear on "Respecting drop order", "Moving out of drop" and what exactly " &amp;&lt;Box&lt;_&gt; as Deref&gt;::deref(&amp;box_foo).b" (from the RFC) would be used for -- not sure whether you want to spend any cycles on that given the other open questions though</p>
</blockquote>
<p>well I think it'd be good to come up with some canonical examples</p>



<a name="164013281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013281">(Apr 23 2019 at 17:58)</a>:</h4>
<p>not sure if you mean that you are not sure on what the canonical examples would be?</p>



<a name="164013324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013324">(Apr 23 2019 at 17:58)</a>:</h4>
<p>So <span class="user-group-mention" data-user-group-id="1175">@WG-rfc-2229</span> -- it's our usual sync time <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span> </p>
<p>As you can see above, <span class="user-mention" data-user-id="127677">@ange</span> and I spent some time already going through the "upvar conversion".</p>



<a name="164013329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013329">(Apr 23 2019 at 17:59)</a>:</h4>
<p><span class="user-mention" data-user-id="128294">@blitzerr</span> I'm assumign you're still occupied?</p>



<a name="164013357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013357">(Apr 23 2019 at 17:59)</a>:</h4>
<p>I think you pinged the wrong people.</p>



<a name="164013363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013363">(Apr 23 2019 at 17:59)</a>:</h4>
<p>Ah, so I did</p>



<a name="164013367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013367">(Apr 23 2019 at 17:59)</a>:</h4>
<p>Sorry!</p>



<a name="164013391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013391">(Apr 23 2019 at 17:59)</a>:</h4>
<p>I was thinking "didn't we just do that?"..</p>



<a name="164013404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164013404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164013404">(Apr 23 2019 at 17:59)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="1175">@WG-rfc-2229</span> is indeed what I meant =)</p>



<a name="164020416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164020416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164020416">(Apr 23 2019 at 19:14)</a>:</h4>
<blockquote>
<p>so, first of all, upvar analysis takes place <strong>after</strong> type-checking</p>
</blockquote>
<p>Oh that's right. I got confused because <code>ty.needs_drop</code> was complaining about inference types/regions, but that must have been because in my exploratory hack I was only lifting the specific type, but of course for this to work, writeback needs to have happened first. I think.</p>



<a name="164020489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164020489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164020489">(Apr 23 2019 at 19:15)</a>:</h4>
<blockquote>
<p>not sure if you mean that you are not sure on what the canonical examples would be?</p>
</blockquote>
<p>I thought the canonical examples could be the ones inline in the dropbox paper? If not, then no, I'm not sure what they would be</p>



<a name="164020529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164020529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164020529">(Apr 23 2019 at 19:16)</a>:</h4>
<blockquote>
<p>So <span class="user-group-mention" data-user-group-id="1175">@WG-rfc-2229</span> -- it's our usual sync time <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span> </p>
</blockquote>
<p>Sorry for not being here, something came up</p>



<a name="164021271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164021271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164021271">(Apr 23 2019 at 19:23)</a>:</h4>
<blockquote>
<p>(this feels like it would be a good candidate for the rustc design meeting, while i'm at it)</p>
</blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> is this a thing that's going to happen? AFAIU, other than maybe looking at more testcases, I'm not sure what I should try to look at the next few days, if anything</p>



<a name="164021301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164021301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164021301">(Apr 23 2019 at 19:23)</a>:</h4>
<p>(no pressure of course, I can just, you know, not work during vacation, that sounds healthy)</p>



<a name="164032893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164032893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164032893">(Apr 23 2019 at 21:47)</a>:</h4>
<p>the rustc design meeting will hopefully happen -- though there are some details to hammer out</p>



<a name="164032906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164032906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164032906">(Apr 23 2019 at 21:47)</a>:</h4>
<p>discussing <em>this idea</em> there is not going to happen without more work :)</p>



<a name="164037915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164037915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164037915">(Apr 23 2019 at 23:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <br>
I am here. Will be able to do something over the weekend going forward. Any updates for me ? Did we make some progress on the test failures.</p>



<a name="164058728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164058728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ange <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164058728">(Apr 24 2019 at 06:56)</a>:</h4>
<blockquote>
<p>discussing <em>this idea</em> there is not going to happen without more work :)</p>
</blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> well kindly let me know if there's anything I can help with in that direction then :-)</p>



<a name="164292988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164292988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164292988">(Apr 26 2019 at 19:55)</a>:</h4>
<p><span class="user-mention" data-user-id="128294">@blitzerr</span> I never did figure out the test failure thing, but I <em>would</em> really like to get that PR of yours landed.</p>



<a name="164292993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164292993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164292993">(Apr 26 2019 at 19:55)</a>:</h4>
<p>So it'd be nice to carve out some time for that</p>



<a name="164293182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/sync%202019-04-16/near/164293182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/sync.202019-04-16.html#164293182">(Apr 26 2019 at 19:58)</a>:</h4>
<p>Sounds good. <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>